home *** CD-ROM | disk | FTP | other *** search
- /*
- * FILE: dfile.h
- * AUTHOR: R. Gonzalez
- * CREATED: January 30, 1991
- *
- * Defines database file class for test app.
- */
-
- # ifndef dfile_h
- # define dfile_h
-
- # include "class.h"
- # define MAX_DATA 50
-
- struct Test_App; /* Can't #include yet due to circular def. */
-
- /************************************************************************
- * database file
- ************************************************************************/
- struct Dfile:Generic_Class
- {
- char *name[MAX_DATA];
- char *age[MAX_DATA];
- int num_data;
- char *filename;
-
- boolean init(void);
- virtual boolean open_existing(char*);
- virtual boolean write_valid(char*);
- virtual boolean add_record(char*,char*);
- virtual boolean get_record(int,char*);
- virtual boolean sort_by_name(void);
- virtual boolean sort_by_age(void);
- virtual void show_name(struct Test_App*); /* don't forget 'struct' */
- boolean destroy(void);
- };
-
- # include "testapp.h" /* OK to #include here */
-
- # endif
-